import 'package:json_annotation/json_annotation.dart';

part 'jr_good_model.g.dart';

@JsonSerializable()
class JrGoodsModel {
  String? code;
  double? discount;
  int? exchangeCoin;
  String? goodsId;
  String? icon;
  bool? isPromotion;
  double? originalPrice;
  double? originalPriceRupee;
  double? price;
  double? priceRupee;
  String? type;
  String? tags;

  JrGoodsModel(
      {this.code,
      this.discount = 0,
      this.exchangeCoin = 0,
      this.goodsId,
      this.icon,
      this.isPromotion = false,
      this.originalPrice = 0.0,
      this.originalPriceRupee = 0.0,
      this.price = 0.0,
      this.priceRupee = 0.0,
      this.type,
      this.tags});

  factory JrGoodsModel.fromJson(Map<String, dynamic> json) => _$JrGoodsModelFromJson(json);

  Map<String, dynamic> toJson() => _$JrGoodsModelToJson(this);
}
